import request from '@/config/axios'

export interface OrderTypeVO {
                    code: string
                    description: string
                    id: number
}

// 查询订单类型列表
export const getOrderTypePage = async (params) => {
  return await request.get({ url: '/vrs/order-type/page', params })
}

// 查询订单类型详情
export const getOrderType = async (id: number) => {
  return await request.get({ url: '/vrs/order-type/get?id=' + id })
}

// 新增订单类型
export const createOrderType = async (data: OrderTypeVO) => {
  return await request.post({ url: '/vrs/order-type/create', data })
}

// 修改订单类型
export const updateOrderType = async (data: OrderTypeVO) => {
  return await request.put({ url: '/vrs/order-type/update', data })
}

// 删除订单类型
export const deleteOrderType = async (id: number) => {
  return await request.delete({ url: '/vrs/order-type/delete?id=' + id })
}

// 导出订单类型 Excel
export const exportOrderTypeApi = async (params) => {
  return await request.download({ url: '/vrs/order-type/export-excel', params })
}

export const listOrderTypeDict = async () => {
  return await request.get({ url: '/vrs/order-type/list-dict' })
}
